﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GameSchool.Models;

namespace GameSchool.DAL
{
    public interface ICourseRepository : IDisposable
    {
        // Nánari upplýsingar um hvernig Repository patternið virkar er á:
        // http://www.asp.net/mvc/tutorials/getting-started-with-ef-using-mvc/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application

        List<Course> GetCourses();
       
        Course GetCourseById(int courseId);
        List<CourseRules> GetCourseRules(int courseId);
        List<CourseStudents> GetCourseStudents(int courseId);
        
        List<vCoursesAdmin> GetCoursesAdmin();
        List<vCoursesStudent> GetCoursesStudent(Guid studentUserId);
        List<vCoursesTeacher> GetCoursesTeacher(Guid teacherUserId);

        List<vSemesters> GetSemesters();
        List<string> GetStudents();
        Dictionary<Guid, string> GetTeachers();

        CourseStudents AddStudentToCourse(int courseId, Guid studentUserId, bool isInstructor);
        void RemoveStudentFromCourse(int courseId, Guid studentUserId);
        void UpdateStudentInstructorStatus(int courseId, Guid studentUserId, bool isInstructor);

        void InsertCourse(Course course);
        void UpdateCourse(Course course);
        void Save();
    }
}
